﻿<!-- 
This resource dictionary is used by the MainWindow. 
-->
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:vm="clr-namespace:MContracts.ViewModel"
  xmlns:vw="clr-namespace:MContracts.View"  
  xmlns:controls="clr-namespace:MContracts.Controls" 
  xmlns:Dialogs="clr-namespace:MContracts.Controls.Dialogs">
  

    <!--<DataTemplate DataType="{x:Type vm:ContractRepositoryViewModel}">
        <vw:ContractRepositoryView />
    </DataTemplate>-->
    
    <DataTemplate DataType="{x:Type vm:ContractRepositoryViewBasedViewModel}">
        <vw:ContractRepositoryViewBasedView />
    </DataTemplate>

    <DataTemplate DataType="{x:Type vm:ContractViewModel}">
        <vw:ContractView />
    </DataTemplate>
    
    <DataTemplate DataType="{x:Type vm:ScheduleViewModel}">
        <vw:ScheduleView />
    </DataTemplate>

    <!--<DataTemplate DataType="{x:Type vm:ExcelReportViewModel}">
        <vw:ReportViewerView />
    </DataTemplate>-->
    
    <!--<DataTemplate DataType="{x:Type vm:ExcelReportViewModel}">
        <Dialogs:ReportViewerHost />
    </DataTemplate>-->
       

    <Style x:Key="MainHCCStyle" TargetType="{x:Type HeaderedContentControl}">
        <Setter Property="IsTabStop" Value="False" />
    </Style>

  <!--
  This style ensures that the borders in the main window are consistent.
  -->
  <Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
    <Setter Property="Background" Value="WhiteSmoke" />
    <Setter Property="BorderBrush" Value="LightGray" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="CornerRadius" Value="5" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>

  <!-- 
  This template explains how to render 
  a tab item with a close button.
  -->
  <DataTemplate x:Key="ClosableTabItemTemplate">
    <DockPanel>
      <Button 
        Command="{Binding Path=CloseCommand}"
        Content="X"
        Cursor="Hand"
        DockPanel.Dock="Right"
        Focusable="False"
        FontFamily="Courier" 
        FontSize="9"
        FontWeight="Bold"  
        Margin="5,1,0,0"
        Padding="0"
        VerticalContentAlignment="Bottom"
        Width="16" Height="16" />
      <ContentPresenter Content="{Binding Path=DisplayName}" VerticalAlignment="Center"/>
    </DockPanel>
  </DataTemplate>

  <!--
  This template explains how to render the 'Workspace' content area in the main window.
  -->
  <DataTemplate x:Key="WorkspacesTemplate">
    <TabControl
      IsSynchronizedWithCurrentItem="True" 
      ItemsSource="{Binding}" 
      ItemTemplate="{StaticResource ClosableTabItemTemplate}"
      Margin="4"/>
  </DataTemplate>

</ResourceDictionary>